package one.stand.controller;

import com.jmp.autocofiguration.web.interceptor.SecurityAuthCheck;
import io.swagger.annotations.Api;
import one.stand.model.CompanyApplyRecordModel;
import one.stand.model.CompanyCategoryRelationModel;
import one.stand.model.ResultModel;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by yandou on 2019/6/14.
 */
@RestController
@RequestMapping("adminApi/company/apply")
@Api(description = "企业申请管理")
public class CompanyApplyController extends BaseController {

    @PostMapping("category/delete")
    public ResultModel categoryDel(@RequestBody CompanyCategoryRelationModel request) {
        return adminFegin.categoryDel(request);
    }

    @PostMapping("category/add")
    public ResultModel categoryAdd(@RequestBody CompanyCategoryRelationModel request) {
        return adminFegin.categoryAdd(request);
    }

    @PostMapping("category/list")
    public ResultModel categoryList(@RequestBody CompanyCategoryRelationModel request) {
        return adminFegin.categoryList(request);
    }

    @PostMapping("list")
    @SecurityAuthCheck
    public ResultModel applyList(@RequestBody CompanyApplyRecordModel request) {
        return adminFegin.applyList(request);
    }

    @PostMapping("updateState")
    @SecurityAuthCheck
    public ResultModel updateState(@RequestBody CompanyApplyRecordModel request) {
        return adminFegin.updateState(request);
    }

}
